import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/blank',
      name: 'blank',
      component: () => import('../views/BlankView.vue'),
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import('../views/HomeView.vue'),
        },
        {
          path: '/map',
          name: 'map',
          component: () => import('../views/MapView.vue'),
        },
        {
          path: '/floor-plan',
          name: 'floorPlan',
          component: () => import('../views/FloorPlanView.vue'),
        },
        {
          path: '/audio-guide',
          name: 'audioGuide',
          component: () => import('../views/AudioGuideView.vue'),
        },
        {
          path: '/facilities',
          name: 'facilities',
          component: () => import('../views/FacilitiesView.vue'),
        },
        {
          path: '/collections',
          name: 'collections',
          component: () => import('../views/CollectionView.vue'),
        },
        {
          path: '',
          redirect: '/home',
        },
      ],
    },
  ],
})

export default router
